home *** CD-ROM | disk | FTP | other *** search
/ Java Programmer's Toolkit / Java Programmer's Toolkit.iso / applets / dance / classes / step.jav < prev    next >
Encoding:
Text File  |  1995-09-13  |  2.5 KB  |  98 lines

  1. /*-
  2.  * Copyright (c) 1995 by Georg Hessmann.
  3.  * All Right Reserved.
  4.  *
  5.  * Step.java    1.0   25 Aug 1995
  6.  *        1.1   13 Sep 1995
  7.  *
  8.  */
  9.  
  10.  
  11. /**
  12.  * Step stores the information of one step.
  13.  *
  14.  * @see Figur
  15.  * @see Floor
  16.  *
  17.  * @version 1.1, 13 Sep 1995
  18.  * @author Georg Heßmann
  19.  */
  20.  
  21. public class Step {
  22.   float        time_step;    // wie lange benoetigt dieser Schritt (an Schlaegen)
  23.   boolean    is_left;
  24.   boolean    is_dotted;
  25.   int        deg;
  26.   float        x;
  27.   float     y;
  28.   String        takt_str;    // slow/quick
  29.   int           ht_id;        // heel/toes (def. in Figur.java)
  30.  
  31.  
  32.   /**
  33.    * Stores one step with time and heel/toe string.
  34.    * @param t how much time is to wait until the next step can be set
  35.    * @param l is this a left foot
  36.    * @param dot is this a dotted foot
  37.    * @param xp x-coordinate relative to the dance-floor grid
  38.    * @param yp y-coordinate relative to the dance-floor grid
  39.    * @param TStr time string (e.g. slow/quick)
  40.    * @param HTid heel/toe id number (defined in Figur.java)
  41.    */
  42.   public Step(float t, boolean l, boolean dot, int d, float xp, float yp,
  43.           String Tstr, int HTid)
  44.   {
  45.     time_step = t;
  46.     is_left   = l;
  47.     is_dotted = dot;
  48.     deg       = d;
  49.     x         = xp;
  50.     y         = yp;
  51.     takt_str  = Tstr;
  52.     ht_id     = HTid;
  53.   }
  54.  
  55.  
  56.   /**
  57.    * Stores one step with time string.
  58.    * @param t how much time is to wait until the next step can be set
  59.    * @param l is this a left foot
  60.    * @param dot is this a dotted foot
  61.    * @param xp x-coordinate relative to the dance-floor grid
  62.    * @param yp y-coordinate relative to the dance-floor grid
  63.    * @param TStr time string (e.g. slow/quick)
  64.    */
  65.   public Step(float t, boolean l, boolean dot, int d, float xp, float yp, String Tstr)
  66.   {
  67.     time_step = t;
  68.     is_left   = l;
  69.     is_dotted = dot;
  70.     deg       = d;
  71.     x         = xp;
  72.     y         = yp;
  73.     takt_str  = Tstr;
  74.     ht_id     = Figur.HT_n;
  75.   }
  76.  
  77.   /**
  78.    * Stores one step without time string.
  79.    * @param t how much time is to wait until the next step can be set
  80.    * @param l is this a left foot
  81.    * @param dot is this a dotted foot
  82.    * @param xp x-coordinate relative to the dance-floor grid
  83.    * @param yp y-coordinate relative to the dance-floor grid
  84.    */
  85.   public Step(float t, boolean l, boolean dot, int d, float xp, float yp)
  86.   {
  87.     time_step = t;
  88.     is_left   = l;
  89.     is_dotted = dot;
  90.     deg       = d;
  91.     x         = xp;
  92.     y         = yp;
  93.     takt_str  = null;
  94.     ht_id     = Figur.HT_n;
  95.   }
  96. }
  97.  
  98.